(function (_super) {
    var EVENT_CLICK = Laya.Event.CLICK;
    var SOUND_INITED = false;
    
    function SetUp() {
        SetUp.super(this);

        this.isCenter = false;

        this.init();
    }
    Laya.class(SetUp, "Alert.SetUp", _super);
    var _proto = SetUp.prototype;
    _proto.destroy = function () {
        _super.prototype.destroy.call(this, true);
    }

    _proto.setVoiceStatus = function () {
        var soundstatus = !GM.muteAudio.getMuteState();

        Laya.SoundManager.musicMuted = soundstatus;
        Laya.SoundManager.soundMuted = soundstatus;
        
        this.voiceFlag.visible = soundstatus;
        GM.muteAudio.setMuteState(soundstatus);
    }
    _proto.showHelp = function () {
        ppt.director.popScene(new Alert.Help, {shadowAlpha : 0.8});
    }
    _proto.init = function () {
        this.mouseEnabled = true;
        this.right = 50;
        this.top = 100;

        this.btnVoice.on(EVENT_CLICK, this, this.setVoiceStatus);
        this.btnHelp.on(EVENT_CLICK, this, this.showHelp);

        this.voiceFlag.visible = GM.muteAudio.getMuteState();
    }

    _proto.onResize = function (height) {
        console.log("Alert SetUp onResize");
        this.callLater(function () {
            this.top = 100;
        });
    }
})(ui.Alert.SetUpUI);